<%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<ul class="nav nav-tabs">
    <li >
        <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/doctor/liveRequisition/hospitalRegistrFrom')">患者登记</a>
    </li>
    <li class="active">
        <a href="#" onclick="loadDiv('hospitalRegistrRight','${ctx}/nurse/newbornRec/bornrecInfo')">新生儿患者登记</a>
    </li>
</ul>
<section class="panel" style="height: 100%">
    <div class="panel-body">
        <div class="table-responsive no-border">
            <div class="datatable-top">
                <div class="pull-left">
                    <form:form id="searchForm" modelAttribute="newbornRec"  onsubmit="return loadDivForm('rightCenterDiv','searchForm','${ctx}/nurse/newbornRec/bornrecInfo');" method="post" class="form-inline">
                        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                        <label>患者姓名 ：</label><form:input path="name" htmlEscape="false" maxlength="50" class="form-control" />
                        <label>性别 ：</label>
                        <form:select  path="sex" maxlength="50" class="form-control">
                            <from:option value="" label=""/>
                            <form:options items="${fns:getDictList('SEX_DICT')}"  htmlEscape="false" itemLabel="label" itemValue="value"/>
                        </form:select>
                        <br/>
                        <label>新生儿住院号 ：</label><form:input path="babyInpNo" htmlEscape="false" maxlength="50" class="form-control" />
                       <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                    </form:form>
                </div>
            </div>
            <table id="contentTable" class="table table-bordered mg-t datatable">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>新生儿住院号</th>
                    <th>出生日期</th>

                </tr>
                </thead>
                <tbody>
                <c:forEach items="${page.list}" var="newbornRec" varStatus="coun">
                    <tr style="cursor: pointer" onclick = searchRight11('',${newbornRec.id}')>
                        <td> ${newbornRec.name} </td>
                        <td> ${fns:getDictLabels(newbornRec.sex, 'SEX_DICT', '')} </td>
                        <td> ${newbornRec.babyInpNo} </td>
                        <td> <fmt:formatDate value="${newbornRec.dateOfBirth}" pattern="yyyy-MM-dd"/> </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <div class="pagination">${page}</div>
        </div>
    </div>
</section>
